package com.labichaoka.chaoka.net;

import com.labichaoka.chaoka.entity.BankCardListResponse;
import com.labichaoka.chaoka.entity.BankInfoDtoResponse;
import com.labichaoka.chaoka.entity.BaseResponse;
import com.labichaoka.chaoka.entity.BindBankRequest;
import com.labichaoka.chaoka.entity.CreditCardResponse;
import com.labichaoka.chaoka.entity.FaceAuthRequest;
import com.labichaoka.chaoka.entity.FaceAuthResponse;
import com.labichaoka.chaoka.entity.FeedBackRequest;
import com.labichaoka.chaoka.entity.FetchMoneyRequest;
import com.labichaoka.chaoka.entity.FetchMoneyResponse;
import com.labichaoka.chaoka.entity.GetBankSmsRequest;
import com.labichaoka.chaoka.entity.GetDepositBalanceInfo;
import com.labichaoka.chaoka.entity.GetWithdrawInfo;
import com.labichaoka.chaoka.entity.GoWithdrawRequest;
import com.labichaoka.chaoka.entity.GoWithdrawResponse;
import com.labichaoka.chaoka.entity.HomeInitResponse;
import com.labichaoka.chaoka.entity.IDCardRequest;
import com.labichaoka.chaoka.entity.IDCardResponse;
import com.labichaoka.chaoka.entity.IsOpenAcountRequest;
import com.labichaoka.chaoka.entity.IsOpenAcountResponse;
import com.labichaoka.chaoka.entity.LimitStatusResponse;
import com.labichaoka.chaoka.entity.LoginRequest;
import com.labichaoka.chaoka.entity.LoginResponse;
import com.labichaoka.chaoka.entity.MessageListResponse;
import com.labichaoka.chaoka.entity.OrderListResponse;
import com.labichaoka.chaoka.entity.OverdueAndIdcardResponse;
import com.labichaoka.chaoka.entity.PersonInfoResponse;
import com.labichaoka.chaoka.entity.QueryIDCardBackResponse;
import com.labichaoka.chaoka.entity.RealInfoRequest;
import com.labichaoka.chaoka.entity.RealNameRequest;
import com.labichaoka.chaoka.entity.SaveInformationRequest;
import com.labichaoka.chaoka.entity.SendCodeRequest;
import com.labichaoka.chaoka.entity.SwitchCardResponse;
import com.labichaoka.chaoka.entity.UserInfoStatusResponse;
import com.labichaoka.chaoka.entity.VerifyInfoListResponse;
import com.labichaoka.chaoka.entity.VersionCheckResponse;
import com.labichaoka.chaoka.entity.WithdrawRecordInfoResponse;

import java.util.Map;

import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;


public interface RetrofitService {

    /*检查更新*/
    @GET("version/versionCheck")
    Observable<VersionCheckResponse> checkVersion(@Query("versionId") String versionId);

    /*获取验证码*/
    //@Headers("Content-Type: application/json; charset=utf-8")
    //@FormUrlEncoded  以表单形式提交
    @POST("vcode/phone/notVali/send")
    Observable<BaseResponse> getNotValiSend(@Body SendCodeRequest request);

    /*登录*/
    @POST("cuser/login/register")
    Observable<LoginResponse> login(@Body LoginRequest request);

    /*退出登录*/
    @POST("user/login/logout")
    Observable<BaseResponse> logout();

    /*首页初始化*/
    @GET("user/info/init")
    Observable<HomeInitResponse> init();

    /*获取资料完善状态*/
    @GET("user/info/status")
    Observable<UserInfoStatusResponse> getUserInfoStatus();

    /*获取逾期状态和实名认证状态*/
    @GET("user/info/overdueAndIdcard")
    Observable<OverdueAndIdcardResponse> overdueAndIdcard();

    /*根据类型上传文件*/
    @POST("file/base64/upload")
    Observable<BaseResponse> uploadFile(@Body IDCardRequest request);

    /*查询是否上传身份证正反面*/
    @GET("user/info/idcard/fback/get")
    Observable<QueryIDCardBackResponse> queryFback();

    /*重置身份证正反面上传*/
    @GET("user/info/idcard/img/reset")
    Observable<BaseResponse> resetCardId();

    /*保存个人信息*/
    @POST("quotaCalculate/perInfoAuth/savePerInfo")
    Observable<BaseResponse> saveInformation(@Body SaveInformationRequest request);

    /*获取身份证和真实姓名*/
    @GET("user/info/realName/idcard/get")
    Observable<IDCardResponse> queryIDCard();

    /*修改真实姓名*/
    @POST("user/info/realName/save")
    Observable<BaseResponse> resetRealName(@Body RealNameRequest request);

    /*获得orc识别结果*/
    @POST("operate/querykinAndEmerStatus")
    Observable<BaseResponse> getIDCardVerifyResult();

    /*获取绑定银行卡验证码*/
    @POST("quotaCalculate/bankCardAuth/getVerfiyCode")
    Observable<BaseResponse> getBankSms(@Body GetBankSmsRequest request);

    /*绑定银行卡*/
    @POST("quotaCalculate/bankCardAuth/submitBankCardInfo")
    Observable<BaseResponse> bindCard(@Body GetBankSmsRequest request);

    /*提交首次绑卡短信验证码接口*/
    @POST("quotaCalculate/bankCardAuth/submitVerfiyCode")
    Observable<BaseResponse> bindCardVail(@Body BindBankRequest request);

    /*查询是否为种子用户*/
    @GET("user/info/seed")
    Observable<LoginResponse> queryIsSeed();

    /*获取银行卡列表*/
    @GET("user/bank/card/get")
    Observable<BankCardListResponse> getBankList();

    /*获取个人信息*/
    @GET("user/info/personalInfo")
    Observable<PersonInfoResponse> getPersonInfo();

    /*提交问题反馈*/
    @POST("fBackController/saveFeedback")
    Observable<BaseResponse> commitFeedBack(@Body FeedBackRequest request);

    /*获取额度及激活状态*/
    @GET("user/info/quota/info/get")
    Observable<LimitStatusResponse> limitActStatus();

    /*预生成订单*/
    @POST("portal/order/v1/orders/preSubmitting")
    Observable<FetchMoneyResponse> fetchMoney(@Body FetchMoneyRequest request);

    /*查询个人(公私)的消息内容*/
    @GET("msgController/queryMessInfoByPid")
    Observable<MessageListResponse> getMessageList();

    /*获取借款记录*/
    @GET("portal/repayment/order/v2/loanMoney/list")
    Observable<OrderListResponse> getOrderList();

    /*查询支持银行卡列表*/
    @POST("user/bank/card/getBankCardList")
    Observable<BankInfoDtoResponse> getBankCardList();

    /*首次绑卡提交接口*/
    @POST("user/bank/card/submitBankCardInfo")
    Observable<BaseResponse> submitBankCardInfo(@Body GetBankSmsRequest request);

    /*变更银行卡接口*/
    @POST("user/bank/card/changeBankCard")
    Observable<BaseResponse> changeBankCard(@Body GetBankSmsRequest request);

    /*提交换绑卡银行卡接口 */
    @POST("user/bank/card/submitVali")
    Observable<BaseResponse> submitVali(@Body BindBankRequest request);

    /*我的存管账户余额信息接口 */
    @GET("deposit/withdraw/getDepositBalanceInfo")
    Observable<GetDepositBalanceInfo> getDepositBalanceInfo();

    /*是否开户*/
    @POST("deposit/userAcountController/isOpenAcount")
    Observable<IsOpenAcountResponse> isOpenAcount(@Body IsOpenAcountRequest request);

    /*获取提现信息接口 */
    @POST("deposit/withdraw/getWithdrawInfo")
    Observable<GetWithdrawInfo> getWithdrawInfo();

    /*立即提现接口*/
    @POST("deposit/withdraw/goWithdraw")
    Observable<GoWithdrawResponse> goWithdraw(@Body GoWithdrawRequest request);

    /*获取提现记录信息接口*/
    @GET("deposit/withdraw/getWithdrawRecordInfo")
    Observable<WithdrawRecordInfoResponse> getWithdrawRecordInfo();


    /*获取资料完善状态*/
    @GET("quotaCalculate/dataComplete/status")
    Observable<VerifyInfoListResponse> getVerifyInfoList();

    /*提交实名认证*/
    @POST("quotaCalculate/realNameAuth/submitRealNameAuth")
    Observable<BaseResponse> submitRealNameAuth(@Body RealInfoRequest request);

    /*清除所有认证信息接口*/
    @POST("quotaCalculate/authInfo/clearAuthInfo")
    Observable<BaseResponse> clearAuthInfo();

    /*活体认证*/
    @POST("quotaCalculate/perInfoAuth/faceAuth")
    Observable<FaceAuthResponse> faceAuth(@Body FaceAuthRequest request);

    /*埋点*/
    @GET("user/behavior/track")
    Observable<BaseResponse> behavior(@Query("actionNode") String actionNode);

    /*获取活体验证结果接口*/
    @POST("quotaCalculate/perInfoAuth/getFaceAuthStatus")
    Observable<FaceAuthResponse> getFaceAuthStatus();

    /*超卡换卡*/
    @POST("deposit/userAcountController/switchCard")
    Observable<SwitchCardResponse> scrdSwitchCard(@Body GetBankSmsRequest request);
    /*超卡提交变更信息*/
    @POST("deposit/userAcountController/submitSwitchCard")
    Observable<SwitchCardResponse> submitSwitchCard(@Body BindBankRequest request);

    /*清除运营商*/
    @POST("quotaCalculate/authInfo/resetUserStatus")
    Observable<BaseResponse> resetUserStatus();

    /*信用卡是否展示开关*/
    @GET("creditCard/creditCardRat/creditCardSwitch")
    Observable<CreditCardResponse> creditCardSwitch();


    /*上传定位信息*/
    @FormUrlEncoded
    @POST("version/versionCheck")
    Observable<VersionCheckResponse> uploadLocation(@Field("versionId") String versionId);

    /*上传通讯录*/
    @FormUrlEncoded
    @POST("version/versionCheck")
    Observable<BaseResponse> uploadContactList(@QueryMap Map<String,String> paramsMap);

}
